<template>
  <div class="container">
    <el-card class="box-card">
      <div class="tatle">
        <div class="input">
          <div class="choose">
            <el-form
              ref="form"
              :model="form"
              label-width="80px"
            >
              <el-form-item
                class="search"
                label="标签名称"
              >
                <el-input
                  v-model="value"
                />
              </el-form-item>
            </el-form>
            <el-form
              ref="form"
              :model="form"
              label-width="80px"
            >
              <el-form-item
                class="search"
                label="状态"
              >
                <el-select
                  v-model="value"
                  placeholder="请选择"
                >
                  <el-option
                    label="启用"
                    value="shanghai"
                  />
                  <el-option
                    label="禁用"
                    value="shanghai"
                  />
                </el-select>
              </el-form-item>
            </el-form>
          </div>
          <el-row>
            <el-button>清空</el-button>
            <el-button type="primary">搜索</el-button>
          </el-row>
        </div>
        <div>
          <el-row>
            <el-button
              type="success"
              icon="el-icon-edit"
            >
              新增用户
            </el-button>
          </el-row>
        </div>
      </div>
      <template>
        <el-alert
          class="message"
          :title="`共 ${2} 条记录`"
          :closable="false"
          type="info"
          show-icon
        />
      </template>
      <template>
        <el-table
          :data="tableData"
          style="width: 100%">
          <el-table-column
            prop="date"
            label="序号"
            width="180">
          </el-table-column>
          <el-table-column
            prop="name"
            label="邮箱"
            width="180">
          </el-table-column>
          <el-table-column
            prop="address"
            label="联系电话">
          </el-table-column>
          <el-table-column
            prop="address"
            label="用户名">
          </el-table-column>
          <el-table-column
            prop="address"
            label="权限组名称">
          </el-table-column>
          <el-table-column
            prop="address"
            label="角色">
          </el-table-column>
          <el-table-column
            prop="address"
            label="操作"
          >
            <el-button type="text">启用</el-button>
            <el-button type="text">禁用</el-button>
            <el-button type="text">修改</el-button>
            <el-button type="text">删除</el-button>
          </el-table-column>
        </el-table>
      </template>
      <div class="pagination">
        <el-pagination
          background
          layout="prev, pager, next, sizes, jumper"
          :total="1000"
        />
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      input: '',
      value: '',
      tableData: [{
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        date: '2016-05-04',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        date: '2016-05-01',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        date: '2016-05-03',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1516 弄'
      }]
    }
  }
}
</script>

<style lang="scss" scoped>
.container {
  padding: 16px;

  .tatle {
    display: flex;
    justify-content: space-between;

    .input {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      grid-gap: 16px;

      .choose {
        display: flex;

        .search {
          margin: auto 0;
        }
      }
    }
  }

  .message {
    margin: 24px 0;
  }

  .edit {
    background: #ecf5ff;
    color: #409eff;
  }

  .delete {
    background: #fef0f0;
    color: #f56c6c;
  }

  .pagination {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
  }
}
</style>
